package com.example.drcbackend.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.drcbackend.Mapper.DbMapper;
import com.example.drcbackend.Mapper.attributessetsMapper;
import com.example.drcbackend.entity.Db;
import com.example.drcbackend.entity.attributessets;
import com.example.drcbackend.jwt.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/at")
@RestController
@CrossOrigin
public class AttributessetsController {
    @Autowired
    private DbMapper dm;
    @Autowired
    private attributessetsMapper atm;
    @PostMapping("/getattributes")//显示属性集
    public Result getattributes(String DBid) {
        LambdaQueryWrapper<attributessets> lqw = new LambdaQueryWrapper<>();
        lqw.eq(attributessets::getDbid,DBid);
       List<attributessets> at=atm.selectList(lqw);
        return Result.ok().data("at",at);
    }

}
